package com.dhemery.mack.adapters;

import com.dhemery.mack.model.Folder;
import com.dhemery.mack.model.Page;
import com.dhemery.mack.model.Project;
import com.dhemery.mack.model.Session;

public enum ImageKey {
	FOLDER("icons/16/folder_open.png"),
	PAGE("icons/16/file_obj.png"),
	PROJECT("icons/16/project_open.png"),
	SESSION("icons/16/project_open.png");

	private final String imagePath;
	
	private ImageKey(String imagePath) {
		this.imagePath = imagePath;
	}

	public String getImagePath() {
		return imagePath;
	}

	public static ImageKey getImageKey(Object element) {
		if(element instanceof Page) return PAGE;
		if(element instanceof Session) return SESSION;
		if(element instanceof Project) return PROJECT;
		if(element instanceof Folder) return FOLDER;
		return null;
	}
}
